<?php
/**
 * Model
 */
class Example extends Psa_Plugin_Model {
		
	
	/**
	 * Checks if arguments are integers and sums them
	 */
	function sum($number1, $number2){
		
		// input validation
		$validator = new Psa_Validator();
		$validator->add_required($number1,'int');
		$validator->add_required($number2,'int');
		$validator->validate();

		// sum numbers
		$this->psa_result->sum_result = $number1 + $number2;
	}

}
